/*
 * $Id: AbstractFill.java 25 2008-09-05 10:20:13Z cyberjos@gmail.com $
 *
 * @(#)AbstractFill.java 2008/9/2
 *  
 * Copyright (c) 2008 Joseph S. Kuo, Max Chu
 * All Rights Reserved.
 *
 * --LICENSE NOTICE--
 * This file is part of Zebrafish, which is a Java wrapper for Google
 * Chart API.
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see 
 * <http://www.gnu.org/licenses/>.
 * --LICENSE NOTICE--
 */

package org.zebrafish.fill;

import org.apache.commons.lang.Validate;
import org.zebrafish.field.Color;

/**
 * An implementation of <code>Fill</code>.
 * 
 * @author Joseph S. Kuo
 * @version $Revision: 25 $, $Date: 2008-09-05 10:20:13 +0000 (Fri, 05 Sep 2008) $
 * @since 0.1
 */
public abstract class AbstractFill implements Fill {
	private Color color;

	/**
	 * Constructs a fill object with the specified color.
	 * 
	 * @param color the color of fill
	 * @throws IllegalArgumentException if the specified color is null
	 */
	public AbstractFill(Color color) {
		setColor(color);
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		Validate.notNull(color, "The specified must not be null.");
		this.color = color;
	}
}
